<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 17-5-2
 * Time: 下午5:24
 */

namespace App\Model;

use Think\Model;

class CartModel extends Model{


    protected $_auto = array (
        array('member_id','1'),  // 新增的时候把status字段设置为1
    );


    protected function _before_insert(&$data, $option)
    {
       // $data['member_id']=1;
//        ["goods_number"] => array(6) {
//        [0] => string(1) "1"
//        [1] => string(1) "2"
//        [2] => string(1) "1"
//        [3] => string(1) "1"
//        [4] => string(0) ""
//        [5] => string(0) ""
        //$gi=I('post.goods_id');



//        $data['goods_id']=implode(',',$data['goods_id']);
//        $data['goods_number']=implode(',',$data['goods_number']);
//        $data['member_id']=5;
//        $data['price']=5222;

    }



} 